@extends("admin.layout.main")

@section("css")
	<link rel="stylesheet" href="/adstatic/cashrecord/cashRecord.css" media="all" />
@endsection

@section("content")
	{{--{{ dd($querystr) }}--}}
	<blockquote class="layui-elem-quote news_search">
		<div class="layui-inline">
		    <div class="layui-input-inline">
		    	<input type="text" value="{{$querystr}}" placeholder="请输入关键字" class="layui-input search_input" id="search_input">
		    </div>
		    <button class="layui-btn search_btn" id="search_btn">查询</button>
		    <a href="/userCashList" class="layui-btn">重置</a>
			<span>注：支持"账户号"与"账户名"搜索！</span>
		</div>
		<div class="layui-inline">
			<div class="layui-form-mid layui-word-aux"></div>
		</div>
	</blockquote>
	<div class="layui-form users_list">
	  	<table class="layui-table">
		    <colgroup>
				<col width="">
				<col width="">
				<col>
				<col width="">
				<col >
				<col >
				<col width="">
				<col width="">
		    </colgroup>
		    <thead>
				<tr>
					{{--<th><input type="checkbox" name="" lay-skin="primary" lay-filter="allChoose" id="allChoose"></th>--}}
					<th>姓名</th>
					<th>金额</th>
					<th>账户名</th>
					<th>账户号</th>
					<th>审核状态</th>
					<th>审核操作</th>
					<th>生成时间</th>
					<th>操作时间</th>
				</tr>
		    </thead>
		    <tbody class="users_content">
			@foreach ($datas as $data)
				<tr>
				{{--<td data-id="{{ $data->id }}"><input type="checkbox" name="checked" lay-skin="primary" lay-filter="choose"></td>--}}
				<td>{{ $data->getUidName->name }}</td>
				<td>{{ $data->amount }}</td>
				<td>{{ $data->account_name }}</td>
				<td>{{ $data->account }}</td>
				<td>
					@switch($data->status)
						@case(1)
							待处理
							@break
						@case(2)
							已处理
							@break
						@case(3)
							失败
							@break
						@default
							作废
					@endswitch
				</td>
				<td>
					<input data-id="{{ $data->id }}" data-uid="{{$data->uid}}" data-amount="{{$data->amount}}" type="checkbox" lay-skin="switch" lay-text="是|否" lay-filter="isOn"
						   @if ($data->status == 2) checked disabled @endif>
				</td>
				<td>{{ date('Y-m-d H:i:s',$data->create_time) }}</td>
				<td>{{$data->update_time?date('Y-m-d H:i:s',$data->update_time):'暂无'}}</td>

				</tr>
			@endforeach
			</tbody>
		</table>
	</div>
	<div style="text-align: right;">
	{{ $datas->appends(['querystr'=>$querystr])->links('admin.layout.paginate') }}
	</div>

@endsection

@section("js")
	<script type="text/javascript" src="/adstatic/cashrecord/cashRecord.js"></script>
@endsection
